All Functions Used So Far, Week 8

library

{base}

Load an R package

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

lm

{base}

Fit a linear model

ggplot

{GGPLOT2}

Create a ggplot graph

read_excel

{readxl}

Read an Excel file

as.numeric

{base}

Coerce a vector to numeric

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

with

{base}

evaluate expression in the context of a data frame

geom_smooth

{GGPLOT2}

Generates a smoothed conditional means curve / line

geom_point

{GGPLOT2}

Generates a scatter plot

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

cut

{base}

Convert Numeric to Factor

ifelse

{base}

Return a or b depending on the value of test

mutate

{dplyr}

Modify/create a column in a data frame

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

attach

{base}

Attach Set of R Objects to Search Path

c

{base}

Combine values/vectors into a vector

prop.test

{stats}

Test of Equal or Given Proportions

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

ordered

{dplyr}

Create an ordered factor

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

stargazer

{stargazer}

Create a regression output table

setwd

{base}

Set Working Directory

read_dta

{haven}

Read a .dta file (Stata data)

summary

{base}

Obtain summary statistics or detailed regression output

as.character

{base}

Coerce a vector to character

The end!